﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace DailyRssDownload.Lib {
	public class AtomEntry : Entry {
		private XNamespace _atomNamespace = "http://www.w3.org/2005/Atom";

		public AtomEntry(XElement item, Feed objFeed) : base(item, objFeed) {
			Title = item.Element(_atomNamespace + "title").Value;
			Published = DateParser.ParseDateTime(item.Element(_atomNamespace + "published").Value);
			Url = item.Element(_atomNamespace + "link").Attribute("href").Value;
			Description = item.Element(_atomNamespace + "content").Value;
			OsSafeTitle = MakeOsSafeName(item.Element(_atomNamespace + "title").Value);
		}
	}
}
